<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .box {
      width: 600px;
      height: 230px;
      border-bottom: 2px solid black;
      margin: 100px 500px;
      position: relative;
    }
    .box div {
      width: 60px;
      height: 200px;
      border: 1px solid black;
      text-align: center;
      position: absolute;
      top: 0;
      left: 240px;
      box-shadow: 3px 3px 5px black;
      transform-origin: bottom center;
      transition: all 1.5s;
    }
    .box div:nth-of-type(1) {
      background-color: red;
    }
    .box div:nth-of-type(2) {
      background-color: orange;
      opacity: 0;
    }
    .box div:nth-of-type(3) {
      background-color: yellow;
      opacity: 0;
    }
    .box div:nth-of-type(4) {
      background-color: green;
      opacity: 0;
    }
    .box div:nth-of-type(5) {
      background-color: blue;
      opacity: 0;
    }
    .box div:nth-of-type(6) {
      background-color: indigo;
      opacity: 0;
    }
    .box div:nth-of-type(7) {
      background-color: violet;
      opacity: 0;
    }
    .box div:nth-of-type(8) {
      background-color: violet;
      opacity: 0;
    }
    .box div:nth-of-type(9) {
      background-color: indigo;
      opacity: 0;
    }
    .box div:nth-of-type(10) {
      background-color: blue;
      opacity: 0;
    }
    .box div:nth-of-type(11) {
      background-color: green;
      opacity: 0;
    }
    .box div:nth-of-type(12) {
      background-color: yellow;
      opacity: 0;
    }
    .box div:nth-of-type(13) {
      background-color: orange;
      opacity: 0;
    }  
    .box:hover div:nth-of-type(2) {
      transform: rotate(15deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(3) {
      transform: rotate(30deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(4) {
      transform: rotate(45deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(5) {
      transform: rotate(60deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(6) {
      transform: rotate(75deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(7) {
      transform: rotate(90deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(8) {
      transform: rotate(-90deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(9) {
      transform: rotate(-75deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(10) {
      transform: rotate(-60deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(11) {
      transform: rotate(-45deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(12) {
      transform: rotate(-30deg);
      opacity: 1;
    }
    .box:hover div:nth-of-type(13) {
      transform: rotate(-15deg);
      opacity: 1;
    }
  </style>
</head>
<body>
  <div class="box">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>7</div>
    <div>6</div>
    <div>5</div>
    <div>4</div>
    <div>3</div>
    <div>2</div>
  </div>
</body>
</html>